package cc.rengu.igas.bsps.common.enums;
/*
 *Create by zhangxuran on 2020-12-21
 */

public enum OrderStateEnum {
    INIT("0", "初始状态"),
    TRANS_SUCCESS("1", "交易成功"),
    TRANS_FAIL("2", "交易失败"),
    BANK_OVERTIME("3", "交易超时"),
    ;

    private String status;
    private String desc;

    OrderStateEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    /**
     * @param states 状态
     * @return 账户类型描述
     */
    public static String getStatesDesc(String states) {
        for (OrderStateEnum limitAcctTypeEnum : OrderStateEnum.values()) {
            if (limitAcctTypeEnum.getStatus().equals(states)) {
                return limitAcctTypeEnum.getDesc();
            }
        }
        return null;
    }
}
